package com.jmp.api.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
@Builder
public class ShopCartListResponse {
    @ApiModelProperty(value = "店铺列表", dataType = "ShopCartListResponse.Supplier")
    private List<Supplier> supplierList;

    @ApiModel("ShopCartListResponse.Supplier")
    @Data
    @Builder
    public static class Supplier {
        private Integer companyId;
        private String companyName;
        private String companyLogo;
        @ApiModelProperty(value = "商品列表", dataType = "ShopCartListResponse.Goods")
        private List<Goods> goodsList;
    }

    @ApiModel("ShopCartListResponse.Goods")
    @Data
    @Builder
    public static class Goods {
        @ApiModelProperty("购物车ID")
        private Integer shopCartId;

        @ApiModelProperty("商品图片")
        private String photo;
        @ApiModelProperty("商品ID")
        private Integer goodsId;
        @ApiModelProperty("商品名称")
        private String goodsName;
        @ApiModelProperty("规格ID")
        private Integer specId;
        @ApiModelProperty("规格名称")
        private String specName;
        @ApiModelProperty("购物车数量")
        private Integer num;
        @ApiModelProperty("价格")
        private BigDecimal price;

        @ApiModelProperty("规格库存")
        private Integer specNum;
    }
}
